<?php
/*
	我的足迹
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return['set']=$return['setting']=$this->plugin_setting('basic');
if($_RQ['op']=='main'){
	$id=$_RQ['id'];
	$item=$this->pdo_get('task_record',array('id'=>$id,'uniacid'=>$_SESSION['uniacid']));
	$item['type']=$this->pdo_getcolumnu('task_list',array('id'=>$item['taskid'],'uniacid'=>$_SESSION['uniacid']),'type');
	$return['typetitle']=$this->task_types[$item['type']];
	$return['setting']=$this->plugin_setting('basic');
	$return['list']=array();
	$return['params']=array('record_id'=>$id);
	set_html('title','打卡记录');
	exi($return);
}
// js 获取数据
if($_RQ['op']=='getlist'){
	$params=array(
		'uniacid'=>$_SESSION['uniacid'],
		'mid'=>$_SESSION['uid'],
		'record_id'=>intval($_RQ['record_id'])
	);
	$pindex = max(1, intval($_RQ['page']));
	$psize = 10;
	$total='';
	$return['list']=pdo_getslice('jy_inclock_task_record_log',$params,array($pindex,$psize),$total,array(),'','id desc');
	foreach($return['list'] as $k=>&$item){
		$item['intime']=date('Y-m-d',$item['intime']);
	}
	exi($return);
}	